Skip to content

test(help): tie the selector command lists to the command surface - #5041

Merged
thymikee merged 2 commits into
callstack:mainfrom
imranbarbhuiya:test/help-selector-command-lists
Nov 23, 2026
Merged

thymikee merged 2 commits into
callstack:mainfrom
imranbarbhuiya:test/help-selector-command-lists

Conversation

@imranbarbhuiya

@imranbarbhuiya imranbarbhuiya commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the #5028 review notes.

  • Command lists: the "as the target" list in help selectors and selectors.md must equal the commands whose input has a selector field (click, press, fill, longpress, hover, get, is, wait). The other selector inputs are read through the CLI parser and readers, and both texts must name each one: find query, scroll --until, screenshot --crop-on, gesture pinch element, gesture drag source and destination. Any other input field described as a selector fails the test until it is listed.
  • checked example: the bare-key example is now role=switch checked, shown in both texts and pinned to role=switch plus checked=true. It replaces a bare checked that any text containing the word matched.
  • appname/windowtitle note: the help topic keeps the list of snapshots that report them. selectors.md points to agent-device help selectors, as commands.md does for exact behavior.

Validation

  • check:affected --run --head 04d307fef: format, lint, typecheck, layering, fallow, build and vitest-related pass. check:doc-links and check:doc-prose pass.
  • Against the fix(help): give every selector key a rule and list every selector command #5028 topic and docs, only the role=switch checked row fails. The command-list tests pass there and guard later drift.
  • Mutants that each fail the new tests: hover dropped from the help list, wait dropped from the selectors.md list, gesture pinch dropped from selectors.md, screenshot --crop-on dropped from the help, the swipe from field described as a selector, the bare-key example reworded, and a bare key parsed as false.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

@thymikee

Copy link
Copy Markdown
Member

Thanks for tying the selector command lists to the command surface. The change at 04d307f is ready, and there are no conflicts. CI passes apart from two cancelled Body rules jobs, which this diff does not touch. Not verified here: the test and its mutants were read statically and not run, and the CLI was not run for each of the six gesture, scroll, screenshot and find argv shapes. Not blocking, and fine to take or leave: the "described as a selector" check cannot see wait absent (https://github.com/callstack/agent-device/blob/04d307f/src/commands/schema/cli-help-selectors.test.ts#L135) because that field has no description; the find naming check passes on any text containing the word "find" (https://github.com/callstack/agent-device/blob/04d307f/src/commands/schema/cli-help-selectors.test.ts#L118), and the two gesture drag rows share one spelling; NOT_SELECTOR_VALUED and the other-inputs table are two hand-kept lists, which could be replaced by generating the "as the target" sentence from the command metadata (https://github.com/callstack/agent-device/blob/04d307f/src/commands/schema/cli-help-selectors.test.ts#L138); and the website selectors page no longer lists which surfaces report appname and windowtitle (https://github.com/callstack/agent-device/blob/04d307f/website/docs/docs/selectors.md#L106), so a one-line summary could return if that page should stand alone.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 23, 2026
@thymikee
thymikee merged commit 3c68c19 into callstack:main Nov 23, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants